/*
 * copyright Wayne Motycka 2011 released under GPLv3
 */

package carshow;

import java.io.Serializable;

/**
 * A class to contain all car show judging classes mostly for
 * the GUI convenience, initialized from the database tables
 * when those are available from the ShowDatabase object.
 * @author Wayne Motycka
 * @version 0.1
 * April 6, 2011
 */
public class ClassData implements Serializable {
    public static final long serialVersionUID = 1L;
    static ClassData singleton = new ClassData();

    private String Mnemonic;
    private String JudgeClassName;
    private int StartYear;
    private int EndYear;


    public ClassData() {
    }

    public ClassData(String mnem, String desc) {
        Mnemonic = mnem;
        JudgeClassName = desc;
    }
    public ClassData(ClassData cl) {
        this.Mnemonic = new String(cl.getMnemonic());
        this.JudgeClassName = new String(cl.getJudgeClassName());
        this.StartYear = cl.StartYear;
        this.EndYear = cl.EndYear;
    }
    public String getMnemonic() {
        return Mnemonic;
    }
    public void setMnemonic(String mnem) {
        Mnemonic = mnem;
    }
    public String getJudgeClassName() {
        return JudgeClassName;
    }
    public int getStartYear() {
        return StartYear;
    }
    public void setStartYear(int y) {
        StartYear = y;
    }
    public int getEndYear() {
        return EndYear;
    }
    public void setEndYear(int y) {
        EndYear = y;
    }

    public void setJudgeClassName(String clazz) {
        JudgeClassName = clazz;
    }
    
    @Override
    public ClassData clone() {
        ClassData cl = new ClassData(this);
        return cl;
    }
}
